<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>前向查找</title>
		<script>
			// var reg=/^(?!baidu).*$/;
			// alert(reg.test("baidu,hello"));
			// alert(reg.test("google,hello"));
			var r2=/(.)\1{1,}/g;
			//alert(r2.test("aaabbb"));
			alert(r2.test("abcabcff"));
			alert(r2.lastIndex);
			alert(r2.test("ackkhjfk"));
			alert(r2.lastIndex);
		</script>
	</head>
	<body>
	</body>
</html>